package org.rency.common.sequence.service;

import java.util.List;

import org.rency.common.sequence.beans.Sequence;

/**
 * 生产序列号接口
 * @author rencaiyu
 *
 */
public interface SequenceRepository {


    /**
     * 刷新指定序列队列
     * @param sequenceName
     */
    public void flush(String sequenceName);

    /**
     * 获取序列值
     * @param sequenceName
     * @return
     */
    public Long next(String sequenceName);
    
    public boolean save(Sequence sequence);
	
	public boolean delete(String sequenceName);
	
	public Sequence find(String sequenceName);
	
	public List<Sequence> loadAll();
	
}